package com.demo5;

public class TestSingleton {
    //常量
    public static final String NAME = "tom";
    public static void main(String[] args) {
        Singleton singleton = Singleton.getInstance();
        singleton.setName("tom");
        System.out.println(singleton.getName());

        Singleton sin = Singleton.getInstance();
        System.out.println(sin.getName());

       // TestSingleton.NAME;
    }
}
